package com.baizhi.webController;

import com.baizhi.dao.BannerDao;
import com.baizhi.entrty.Banner;
import com.baizhi.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//标记为控制器类
@RestController
@RequestMapping("appbanner")
public class BannerWebController {
    @Autowired
    private BannerService bs;

    @GetMapping("showBanner")
    public List<Banner> showBanner(){
        List<Banner> banners = bs.showAll();

        return banners;

    }
}
